<template>
    <div>
        <van-nav-bar :title="title" left-text="返回" left-arrow @click-left="($router.push('/home/index'))" />
        <div v-for="item in list">
            <router-link :to="{ name:'detail', params:{goods_id:item.goods_id } }">
                <van-card :price="item.goods_price" :title="item.goods_name"
                    :thumb="item.goods_small_logo ? item.goods_small_logo : 'https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg'" />


            </router-link>

        </div>



    </div>
</template>

<script setup>
import bt from '@/components/bt.vue';
const title = '列表'
import { ref } from 'vue';
import { searchApi } from '@/api/api';
let list = ref([])
searchApi().then(res => {
    console.log('列表', res)
    list.value = res.data.message.goods
})


</script>

<style lang="scss" scoped></style>